function ajaxlogin(loginInfo, tourl) {
	console.log(loginurl);
	console.log(JSON.stringify(loginInfo));
	mui.ajax({
		url: loginurl,
		data: loginInfo,
		async: true,
		dataType: 'json',
		crossDomain: true, //强制使用5+跨域
		type: 'post',
		timeout: 20000,
		success: function(res) {
			console.log(JSON.stringify(res));
			// 请求成功
			if(res.status < 1) {
				mui.toast(res.msg);
			} else {
				
//				localStorage.setItem("gz_username",loginInfo.account); //保存值
//				localStorage.setItem("gz_userpass",loginInfo.password); //保存值
				res.userinfo.password = loginInfo.password;
				app.createState(res.userinfo);
				app.setUsers(res.userinfo);
//				console.log(loginInfo);
				app.setLoginInfo(loginInfo);

				//console.log(res.userinfo.user_id);
				//toMain();
				location.href = tourl;
			}
		},
		error: function(xhr, type, errorThrown) {
			//console.log(JSON.stringify(xhr));
			/*
			for(var p in xhr){
				console.log(p);
				console.log(xhr[p]);
			}*/
			console.log(type);
			console.log(JSON.stringify(errorThrown));
			mui.toast('登录失败！');
			// 请求失败
		}
	});
}

function checkPhone(phone) {
//	if(phone == '' || !(/^1(3|4|5|7|8)\d{9}$/.test(phone))) {
//		plus.nativeUI.toast("手机号码有误，请重填手机号");
//		return false;
//	}
	if(phone == '') {
		plus.nativeUI.toast("手机号码不能为空");
		return false;
	}
	return true;
}